<template>
  <div>
    <template v-if="$app.judgeData(orderInfo) && $app.judgeData(orLiInfo)">
      <template v-if="$app.judgeData(orderInfo.applicant_list)">
        <div class="lineH34 c333 f_16 f_bold marginB10">申请人</div>
        <div>
          <div
            class="TJ_big paddingL30"
            v-for="(val,i) in orderInfo.applicant_list"
            :key="'applicant_list'+i"
          >
            <div class=" paddingB10 " :class="val.is_cost_reduction?' TJ_box  ':'  '">
              <Row :gutter="15" class=" ">
                <Col :span="8" class="marginB10">
                  <div>申请人{{i+1}}：{{val.name}}</div>
                </Col>
                <Col :span="8" class="marginB10">
                  <div>类型：{{val.type}}</div>
                </Col>
                <Col :span="8" class="marginB10">
                  <div>证件代码：{{val.id_card}}</div>
                </Col>
              </Row>
              <Row :gutter="15" class=" ">
                <Col :span="4" class="marginB10">
                  <div>国籍：{{val.nationality_name}}</div>
                </Col>
                <Col :span="4">
                  <div>邮政编码：{{val.zip_code}}</div>
                </Col>
                <Col :span="16">
                  <div>联系地址：
                    <!-- 先判断是否中国 -->
                    <template v-if="val.nationality=='CN'">
                      <!-- 有省份代码，就是新数据，否则就是旧数据 -->
                      <template v-if="$app.judgeData(val.province_code)">
                        {{val.province + val.city + val.address_detail }}
                      </template>
                      <!-- 只要是旧数据，不做任何判断，统一显示 address -->
                      <template v-else>
                        {{val.address}}
                      </template>
                    </template>
                    <!-- 非中国 -->
                    <template v-else>
                      {{val.address_detail||val.address}}
                    </template>
                  </div>
                </Col>
              </Row>

              <template v-if="orderInfo.is_cost_reduction && $app.is103_105_132(orLiInfo.goods_type)">
                
                <template v-if="val.is_cost_reduction">
                  <div class="marginB10">
                    <i class="iconfont icondui cBlue relative" style="top:2px;"></i>
                    已完成费减
                  </div>
                </template>
                <template v-else>
                  <div class="reductionBox">
                    <div class="title">
                      费减材料：<span class="cBlue">{{val.type}}</span>
                    </div>
                    <div class="clearfix"></div>

                    <div class="reductionMain">
                      <template v-if="$app.package_file_url(val.org_code_path)">
                        <div class="JC_img borderNone pointer relative pullLeft marginR30 marginB20 heightAuto">
                          <img :src="val.org_code_path.file_url" class="cover  width100 marginB10" @click="$app.openWindow(val.org_code_path.file_url)" style="height:100px;">
                          <div class=" f_12 c999 textCenter">组织机构代码证</div>
                        </div>
                      </template>

                      <template v-if="$app.package_file_url(val.income_proof_path)">
                        <div class="JC_img borderNone pointer relative pullLeft marginR30 marginB20 heightAuto">
                          <img :src="val.income_proof_path.file_url" class="cover  width100 marginB10" @click="$app.openWindow(val.income_proof_path.file_url)" style="height:100px;">
                          <div class=" f_12 c999 textCenter">收入证明</div>
                        </div>
                      </template>

                      <template v-if="$app.package_file_url(val.idcard_path)">
                        <div class="JC_img borderNone pointer relative pullLeft marginR30 marginB20 heightAuto">
                          <img :src="val.idcard_path.file_url" class="cover  width100 marginB10" @click="$app.openWindow(val.idcard_path.file_url)" style="height:100px;">
                          <div class=" f_12 c999 textCenter">身份证复印件</div>
                        </div>
                      </template>

                      <template v-if="$app.package_file_url(val.business_license_path)">
                        <div class="JC_img borderNone pointer relative pullLeft marginR30 marginB20 heightAuto">
                          <img :src="val.business_license_path.file_url" class="cover  width100 marginB10" @click="$app.openWindow(val.business_license_path.file_url)" style="height:100px;">
                          <div class=" f_12 c999 textCenter">营业执照复印件</div>
                        </div>
                      </template>

                      <template v-if="$app.package_file_url(val.taxes_form_cover_path)">
                        <div class="JC_img borderNone pointer relative pullLeft marginR30 marginB20 heightAuto">
                          <img :src="val.taxes_form_cover_path.file_url" class="cover  width100 marginB10" @click="$app.openWindow(val.taxes_form_cover_path.file_url)" style="height:100px;">
                          <div class=" f_12 c999 textCenter">上一年度企业所得税纳税申报表封面</div>
                        </div>
                      </template>

                      <template v-if="$app.judgeData(val.a_class_table_path)">
                        <div class="clearfix"></div>
                        <div class="" style="border-top:1px solid #eee; padding:10px 0;">A 类主表复印件：</div>
                        <div>
                          <template v-for="(jar,r) in (val.a_class_table_path)">
                            <div class="JC_img borderNone pointer relative pullLeft marginR30 marginB20 heightAuto">
                              <img :src="jar.file_url" class="cover  width100 " @click="$app.openWindow(jar.file_url)" style="height:100px;">
                            </div>
                          </template>

                        </div>
                        
                      </template>
                      
                      


                    </div>
                    
                  </div>
                </template>
                
              </template>
            </div>
          </div>
        </div>
      </template>
    </template>
  </div>
</template>

<style lang="less" scoped>
.reductionBox{
  border:1px solid #eee;
  .title{
    padding:5px 15px;
    border-bottom:1px solid #ccc;
    background-color: #f7f7f8;
  }
  .reductionMain{
    overflow: hidden;
    padding: 15px 15px 0 15px;
  }

}
</style>


<script>
export default {
  name: "middle_applicant_list",
  components: {},
  props: ["orderInfo","orLiInfo"],
  data() {
    let data = {};
    let tool = {};
    return Object.assign(data, tool);
  },
  mounted() {}
};
</script>

